package main

import (
	"net/http"
	"io"
)

//使用mux实现go web
func main() {
	mux := http.NewServeMux()
	myHandle := MyHandle{}
	mux.Handle("/", &myHandle)
	http.ListenAndServe("localhost:9000", mux)

}

type MyHandle struct {
}

func (*MyHandle) ServeHTTP(w http.ResponseWriter, request *http.Request) {
	io.WriteString(w, "hello world, this is a mux implement")
}
